import { ChartData } from './bean';

const data:ChartData[] = [
  {
    id: 1,
    title: "基本折线图",
    props: {
      type: "line",
      opts:  {
        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,10,0,15],
        enableScroll: false,
        legend: {},
        xAxis: {
          disableGrid: true
        },
        yAxis: {
          gridType: "dash",
          dashLength: 2
        },
        extra: {
          line: {
            type: "straight",
            width: 2,
            activeType: "hollow"
          }
        }
      },
      charData: {
        categories: ["2018","2019","2020","2021","2022","2023"],
        series: [
          {
            name: "成交量A",
            data: [35,8,25,37,4,20]
          },
          {
            name: "成交量B",
            data: [70,40,65,100,44,68]
          },
          {
            name: "成交量C",
            data: [100,80,95,150,112,132]
          }
        ]
      }
    }
  },
  {
    id: 2,
    title: "基本曲线图",
    props: {
      type: "line",
      opts: {
        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,10,0,15],
        enableScroll: false,
        legend: {},
        xAxis: {
          disableGrid: true
        },
        yAxis: {
          gridType: "dash",
          dashLength: 2
        },
        extra: {
          line: {
            type: "curve",
            width: 2,
            activeType: "hollow"
          }
        }
      },
      charData: {
        categories: ["2018","2019","2020","2021","2022","2023"],
        series: [
          {
            name: "成交量A",
            lineType: "dash",
            data: [35,8,25,37,4,20]
          },
          {
            name: "成交量B",
            data: [70,40,65,100,44,68]
          },
          {
            name: "成交量C",
            data: [100,80,95,150,112,132]
          }
        ]
      }
    }
  },
  {
    id: 3,
    title: "基本时序图",
    props: {
      type: "line",
      opts: {
        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,10,0,15],
        enableScroll: false,
        legend: {},
        xAxis: {
          disableGrid: true
        },
        yAxis: {
          gridType: "dash",
          dashLength: 2
        },
        extra: {
          line: {
            type: "step",
            width: 2,
            activeType: "hollow"
          }
        }
      } ,
      charData: {
        categories: ["2018","2019","2020","2021","2022","2023"],
        series: [
          {
            name: "成交量A",
            data: [35,8,25,37,4,20]
          },
          {
            name: "成交量B",
            data: [70,40,65,100,44,68]
          },
          {
            name: "成交量C",
            data: [100,80,95,150,112,132]
          }
        ]
      }
    }
  },
  {
    id: 4,
    title: "折线图+断点续连connectNulls",
    props: {
      type: "line",
      opts: {
        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,10,0,15],
        enableScroll: false,
        legend: {},
        xAxis: {
          disableGrid: true
        },
        yAxis: {
          gridType: "dash",
          dashLength: 2
        },
        extra: {
          line: {
            type: "straight",
            width: 2,
            activeType: "hollow"
          }
        }
      },
      charData: {
        categories: ["2018","2019","2020","2021","2022","2023"],
        series: [
          {
            name: "成交量A",
            data: [35,8,null,37,4,20]
          },
          {
            name: "成交量B",
            connectNulls: true,
            data: [70,40,null,100,44,68]
          },
          {
            name: "成交量C",
            data: [100,80,null,150,112,132]
          }
        ]
      }
    }
  },
  {
    id: 5,
    title: "渐变色曲线图",
    props: {
      type: "line",
      opts: {
        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,10,0,15],
        dataLabel: false,
        dataPointShape: false,
        enableScroll: false,
        legend: {},
        xAxis: {
          disableGrid: true
        },
        yAxis: {
          gridType: "dash",
          dashLength: 2,
          data: [
            {
              min: 0,
              max: 150
            }
          ]
        },
        extra: {
          line: {
            type: "curve",
            width: 2,
            activeType: "hollow",
            linearType: "custom"
          }
        }
      },
      charData: {
        categories: ["2018","2019","2020","2021","2022","2023"],
        series: [
          {
            name: "成交量A",
            linearColor: [
              [
                0,
                "#1890FF"
              ],
              [
                0.25,
                "#00B5FF"
              ],
              [
                0.5,
                "#00D1ED"
              ],
              [
                0.75,
                "#00E6BB"
              ],
              [
                1,
                "#90F489"
              ]
            ],
            data: [15,45,15,45,15,45]
          },
          {
            name: "成交量B",
            linearColor: [
              [
                0,
                "#91CB74"
              ],
              [
                0.25,
                "#2BDCA8"
              ],
              [
                0.5,
                "#2AE3A0"
              ],
              [
                0.75,
                "#C4D06E"
              ],
              [
                1,
                "#F2D375"
              ]
            ],
            data: [55,85,55,85,55,85]
          },
          {
            name: "成交量C",
            linearColor: [
              [
                0,
                "#FAC858"
              ],
              [
                0.33,
                "#FFC371"
              ],
              [
                0.66,
                "#FFC2B2"
              ],
              [
                1,
                "#FA7D8D"
              ]
            ],
            data: [95,125,95,125,95,125]
          }
        ]
      }
    }
  },
  {
    id: 6,
    title: "渐变色+阴影+水平动画",
    props: {
      type: "line",
      opts: {
        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,10,0,15],
        dataLabel: false,
        dataPointShape: false,
        enableScroll: false,
        legend: {},
        xAxis: {
          disableGrid: true
        },
        yAxis: {
          gridType: "dash",
          dashLength: 2,
          data: [
            {
              min: 0,
              max: 150
            }
          ]
        },
        extra: {
          line: {
            type: "curve",
            width: 2,
            activeType: "hollow",
            linearType: "custom",
            onShadow: true,
            animation: "horizontal"
          }
        }
      },
      charData: {
        categories: ["2018","2019","2020","2021","2022","2023"],
        series: [
          {
            name: "成交量A",
            linearColor: [
              [
                0,
                "#1890FF"
              ],
              [
                0.25,
                "#00B5FF"
              ],
              [
                0.5,
                "#00D1ED"
              ],
              [
                0.75,
                "#00E6BB"
              ],
              [
                1,
                "#90F489"
              ]
            ],
            setShadow: [
              3,
              8,
              10,
              "#1890FF"
            ],
            data: [15,45,15,45,15,45]
          },
          {
            name: "成交量B",
            data: [55,85,55,85,55,85]
          },
          {
            name: "成交量C",
            linearColor: [
              [
                0,
                "#FAC858"
              ],
              [
                0.33,
                "#FFC371"
              ],
              [
                0.66,
                "#FFC2B2"
              ],
              [
                1,
                "#FA7D8D"
              ]
            ],
            setShadow: [
              3,
              8,
              10,
              "#FC8452"
            ],
            data: [95,125,95,125,95,125]
          }
        ]
      }
    }
  },
  {
    id: 7,
    title: "折线图滚动条",
    props: {
      type: "line",
      opts: {
        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,10,0,15],
        enableScroll: true,
        legend: {},
        xAxis: {
          disableGrid: true,
          scrollShow: true,
          itemCount: 4
        },
        yAxis: {
          gridType: "dash",
          dashLength: 2
        },
        extra: {
          line: {
            type: "straight",
            width: 2,
            activeType: "hollow"
          }
        }
      },
      charData: {
        categories: ["2018","2019","2020","2021","2022","2023"],
        series: [
          {
            name: "成交量A",
            data: [35,8,25,37,4,20]
          },
          {
            name: "成交量B",
            data: [70,40,65,100,44,68]
          },
          {
            name: "成交量C",
            data: [100,80,95,150,112,132]
          }
        ]
      }
    }
  },
  {
    id: 8,
    title: "时间轴折线图",
    props: {
      type: "line",
      opts: {
        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
        padding: [15,10,0,15],
        enableScroll: false,
        legend: {},
        xAxis: {
          disableGrid: false,
          boundaryGap: "justify"
        },
        yAxis: {
          gridType: "dash",
          dashLength: 2,
          data: [
            {
              min: 0,
              max: 80
            }
          ]
        },
        extra: {
          line: {
            type: "curve",
            width: 2,
            activeType: "hollow"
          }
        }
      },
      charData: {
        series: [
          {
            name: "竖线",
            data: [[30,0],[30,80]]
          },
          {
            name: "横线",
            data: [[0,40],[60,40]]
          },
          {
            name: "曲线1",
            data: [[60,70],[30,40],[60,10]]
          },
          {
            name: "曲线2",
            data: [[0,70],[30,40],[0,10]]
          }
        ]
      }
    }
  },
]

export default  data;